<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
var countOdds = function(low, high) {
    if( low%2 == 0 && high%2 == 0 ){
        return ( high - low ) / 2
    }
    else{
        return Math.floor(( high - low ) / 2 ) + 1
    }
};

var low = 3
var high = 9
console.log(countOdds(low, high))
    </script>
</body>
</html>